﻿@page "/server-antiforgery-form/{RenderForm=false}"
@using Microsoft.AspNetCore.Components.Web
@rendermode RenderMode.InteractiveServer

@if (string.IsNullOrEmpty(Name))
{
    <TestContentPackage.InteractiveAntiforgery RenderForm="bool.Parse(RenderForm)" />
}
else if (RendererInfo.IsInteractive)
{
    <p id="result">@Name</p>
}

@code {
    [Parameter] public string RenderForm { get; set; } = null!;

    [SupplyParameterFromQuery] public string Name { get; set; } = "";
}
